package com.bj58.migrate.condition.impl;

import java.util.List;

import com.bj58.migrate.ScfProxy;
import com.bj58.sfft.cmc.entity.DispLocal2;

public class LocalCondition extends AbstractCondition{

	private int localid = 0;

	public LocalCondition(){

		intConditionList();
	}

	public LocalCondition( int localid ){

		this.localid = localid;
		intConditionList();
	}

	@Override
	public void intConditionList(){

		try{
			List< DispLocal2 > list = ScfProxy.cmc_DispLocal2().GetDispLocalByParentID( localid );
			if( list != null ){
				for( DispLocal2 local : list ){
					if( local != null && local.getIsVisible() && local.getIsHome() == 0 ){
						conlist.add( "local=" + String.valueOf( local.getLocalID() ) );
					}
				}
			}
		}
		catch( Exception e ){
			e.printStackTrace();
		}
	}
}
